package com.cat.decorator;

/**
 * @author cat
 * @version 2025/5/21 16:57
 * @description 抽象构件, 快餐类
 * @since JDK17
 */

public abstract class FastFood {
    private float price;
    private String desc;

    public FastFood() {
    }

    public FastFood(float price, String desc) {
        this.price = price;
        this.desc = desc;
    }

    public float getPrice() {
        return price;
    }

    public void setPrice(float price) {
        this.price = price;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
    // 计算价值的方法
    public abstract float cost();
}
